By adding a prefix to another project, internal link style ("prefixed internal link style") can be used to link to a page of another project. A system of short-handed link labels is used to refer to different projects, in the context of interproject linking, as seen within the actual source text. For example, en: refers to the English Wikipedia. This is seen in <nowiki></nowiki>, which produces a link to the English Wikipedia article "Apple". Interwiki links which link different language Wikipedias are known as Interlanguage links.
This is called . For each project, an (a list of target projects with their prefixes) is specified ( example). These target projects need not use MediaWiki and need not even be a wiki.
The interlanguage link feature works on Wikimedia Commons and Wikispecies, producing links to the Wikipedias. This is not reciprocal, a link from a Wikipedia to Commons or Wikispecies is an in-page link.
|
|
* Other Wikimedia prefixes: , , , , , , , , , , , , , , , , , , , , , .
The long form doesn't work within the same project. The shortcut works everywhere. (That is the intention; currently, it does not work on all projects.)
The on Meta lists many prefixes, among others, [[wikipedia:]] () for the English Wikipedia, working from any wiki supporting the Meta interwiki map, not only from MediaWiki wikis. Some prefixes work only with a page, for example: (fails) vs. (works). These prefixes are case insensitive.
Non-Wikimedia interwiki codes have a limitation, that they can only be used through a link. For example, the entry for "" on Wiktionary, a Wikimedia project, can be accessed by [[en:Apple]] or http://meta.wikimedia.org/wiki/wikt:John. However, the latter method does not work for non-Wikimedia wikis. For example, the main page on the Mozilla Wiki can be accessed via [[wikt:John]], but http://meta.wikimedia.org/wiki/MozillaWiki:Main_Page results in an error. In these cases, Special:Search can be used (http://meta.wikimedia.org/wiki/Special:Search/MozillaWiki:Main_Page). You can see for a list of "forward" and "non-forward" prefixes.
For portability across projects, one may want to select a link code that leads to the same target from all projects, for example: . The "superfluous" "MetaWikipedia:" prevents "wikibooks:" being interpreted as namespace prefix, when the code is used at wikibooks itself, while at Meta the "MetaWikipedia:" is ignored (it is not a namespace prefix and even at Meta itself, it is recognized as code for Meta). The codes above work from all projects; however, the existence detection and the self-link feature do not work on interwiki links.
[[MozillaWiki:Main Page]] [[:fr:]]
[[:fr:]] [[:os:]]
If only the project is specified, they typically go to the language of the source, see above. At most, two prefixes are needed for pages in any existing project and any supported language:
[[:os:]] [[s:de:Hauptseite]]
[[s:de:Hauptseite]] [[b:en:Main page]]
In the case of more than one prefix, a page name has to be specified. For example, while and from Meta lead to the English Wikipedia's main page, a bare <nowiki></nowiki> does not work: .
If the language is different, specifying it before the project can also work:
[[b:en:Main page]] [[:de:q:Hauptseite]]
[[w:en:]] [[:en:n:Main page]]
[[:de:q:Hauptseite]] [[n:en:Main page]]
The second example doesn't work from English Wikipedia w:en: pages, a project prefix before the language is better.
More than two prefixes are generally unnecessary, the following examples should work everywhere:
[[:en:n:Main page]] [[m:Help:Help]]
[[n:en:Main page]] [[w:Interwiki]]
Two prefixes can have unexpected effects, for example, from , the following links end up on different pages:
[[m:Help:Help]] [[m:en:About]]
[[w:Interwiki]] [[:en:m:About]]
[[m:en:About]] [[m:About]]
In the first case ignores the m:, because it is local and then, interprets en: as w:en:, the prefix for the . In the second case, the leading en: goes to the English Wikipedia, where the following m: goes straight back to . The second example doesn't work at all, from English Wikipedia w:en: pages, only the third example works everywhere.
In other words, multiple prefixes are evaluated left to right by the relevant Wikimedia servers (project and language). For projects without different languages, like (because Meta is multilingual by itself), language prefixes can be handled as shorthands for w: plus the specified language:
[[:en:m:About]] [[:pl:2006]]
[[m:About]] [[w:pl:2006]]
[[:pl:2006]] [[:pl:w:2006]]
From , the first two links both arrive at the Polish 2006 page. The third arrives at the English , because that's how the server selected by :pl: interprets the second prefix w:.
For a portable link on that server, it would be a bad idea to use w:, but :pl: does the trick. To test that effect from , the following links should go to the same page:
[[w:pl:2006]] [[:ja:2006]]
[[:pl:w:2006]] [[:ja:ja:2006]]
A universal interwiki link, that is, one that works no matter from which Wikimedia wiki, can be written [[:ja:2006]]project:language:page name]] (e.g. ); this routes the parsing of the links via Meta ().
From Wikimedia projects, use [wikiasite:psychology], giving ; [wikia:trains:locomotive], giving ; or for the central Wikia, .
The interlanguage links take the following form:
[[:ja:ja:2006]]
where the language code is the two-letter code as per ISO 639-1. (See : English language is "en", German is "de", etc.) So, for example, in the English language article on plankton, which is available on many other wikis, the interlanguage links might look like this:
[[m:
NOTE: These links are treated specially, and don't show up in the body of the text, but in a special sidebar section "in other languages" listed by language name. Technically they can go anywhere in the article source; placement does not alter the visual appearance of the links on the rendered page, except for the order. However, the convention is to put them at the bottom of the wikitext.
[[language code:Title]].
These 3 examples all resolve to the zh.wikisource page 天問, but without the misleading and distracting appearance of being an external link.
Comparison:
The applicable CSS classes are "extiw" and "external text". The choice may be governed by this, either way, for uniformity or distinction. An interwiki link is easier to type by itself, but if one goes to the webpage anyways, before putting the link, copying the URL is very convenient. When a template is created, e.g. , the template can be made, such that it uses an interwiki link and a parameter, like "tt0389790" or "0389790", or that it uses an external link and a parameter like one of those or the full url, if that is more convenient.
Advantages of interwiki links to the same wiki, compared to internal links: